const baseURL = 'https://open.web.jinrijiesuan.cn/lcfx/'
const request = (options) => {

	return new Promise(function(resolve, reject) {
		uni.request({
			url: baseURL + options.url,
			data: options.data,
			method: options.method,
			timeout: 10000,
			success: (result) => {
				resolve(result.data);
			},
			fail: (err) => {
				wx.showToast({
					title: '网络连接失败',
					icon: 'none',
					duration: 1000
				})
				reject(err)
			}
		})
	})
}
export { request }